#include "Shm.hpp"
#include "Fifo.hpp"
#include <unistd.h>

int main()
{
    Shm shm(pathname,projid,CREATOR);
    Namepipe pipe(PATH,FIFO_FILE);

    FileOperator reader(PATH,FIFO_FILE);

    reader.OpenForRead();
    char* mem=(char*)shm.VirutualAddr();

    while(1)
    {
        if(reader.Wait())
        {
            printf("%s\n",mem);
        }
        else
        {
            break;
        }
        
    }

    reader.Close();

    return 0;
}